package com.kd.juhaowan.http.model;

import java.util.List;

/**
 *    author : Android 轮子哥
 *    github : https://github.com/getActivity/EasyHttp
 *    time   : 2020/10/07
 *    desc   : 统一接口列表数据结构
 */
public class HttpListData2<T>  {

    /** 返回码 */
    private int code;
    /** 提示语 */
    private String msg;
    /** 数据 */
    private List<T> data;

    /** 当前页码 */
    private int pageIndex;
    /** 页大小 */
    private int pageSize;
    /** 总数量 */
    private int totalNumber;
    private int count_value;



    public int getCode() {
        return code;
    }

    public String getMessage() {
        return msg;
    }

    public List<T> getData() {
        return data;
    }

    /**
     * 是否请求成功
     */
    public boolean isRequestSucceed() {
        return code == 1;
    }

    /**
     * 是否 Token 失效
     */
    public boolean isTokenFailure() {
        return code == 401;
    }


    public int getCount_value() {
        return count_value;
    }

    public void setCount_value(int count_value) {
        this.count_value = count_value;
    }
}